package com.example.wpx.controller;

import com.example.wpx.service.UserService;
import com.example.wpx.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/")
public class UserController {
    @Autowired
    private UserService userService;
    @PostMapping("reg")
    public ServerResponse reg(String phone,String pwd){

        return userService.reg( phone, pwd);
    }

    @PostMapping("log")
    public ServerResponse log(String phone,String pwd){
        return userService.log( phone, pwd);
    }
    @PostMapping("info")
    public ServerResponse info(){
        return null;
    }
}
